﻿// Utilities/ExceptionHelper.cs

using System;

namespace DatabaseManager.Utilities
{
    public static class ExceptionHelper
    {
        /// <summary>
        /// 获取完整的异常堆栈信息
        /// </summary>
        public static string GetFullErrorMessage(Exception ex)
        {
            var result = ex.Message;
            while (ex.InnerException != null)
            {
                ex = ex.InnerException;
                result += "\nInner Exception: " + ex.Message;
            }
            return result;
        }
    }
}